package com.mine.yyb.modules.sys.bo;

import com.mine.yyb.common.utils.jdbc.MineBaseBO;

/**
 * <pre>
 * <一句话功能简述>
 * 
 * 订单信息BO类
 * 
 * <功能详细描述>
 * </pre>
 * 
 * @author xuganhua
 * @version [版本号, 2015年12月28日]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class OrderBO extends MineBaseBO
{
    // 下线贡献返利给上线的月数
    public static int PARENT_REBATE_MONTH = 12;
    
    // 下线贡献返利给上线的反利率
    public static double PARENT_REBATE_RATE = 0.1;
    
    // 人民币 对 日元的 汇率
    public static double CJ_RATE = 0;
    
    // 日亚返利率
    public static double CJ_REBATE_RATE = 0.66;
    
    // 链接转换概率
    public static double CJ_CONVERT_RATE = 0.1;
    
    // 人民币 对 美元的 汇率
    public static double CA_RATE = 0;
    
    // 人民币 对 人民币 汇率
    public static double CN_RATE = 1;
    
    // 6pm返利率
    public static double CA_REBATE_RATE = 0.8;
    
    // 日本乐天返利率
    public static double CLT_REBATE_RATE = 0.5;
    
    // 乐天国际返利率
    public static double CLTGJ_REBATE_RATE = 0.7;
    
    // 中国亚马逊返利率
    public static double CN_REBATE_RATE = 0.05;
    
    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = -2709631697203802257L;
    
    // 订单编号
    private String orderID;
    
    // 购物网站 1、日本亚马逊 2、6pm 3、日本乐天 4、乐天国际 5、中国亚马逊
    private String shopSite;
    
    // 用户名
    private String username;
    
    // 标签1
    private String label;
    
    // 返利编号
    private String rebateID;
    
    // 返利金额
    private double rebate;
    
    // 分红金额
    private double parentRebate;
    
    // 内部编号
    private String innerID;
    
    // 上线用户内部编号
    private String parentInnerID;
    
    // 订单价格
    private double orderPrice;
    
    // 订单日期
    private String orderDate;
    
    // 订单年份
    private String orderYear;
    
    // 订单月份
    private String orderMonth;
    
    // 开始日期
    private String startDate;
    
    // 结束日期
    private String endDate;
    
    // 是否符合返利规则 1、无效 2、有效 3、待审核
    private int isValid;
    
    // 是否已经返利 1、未返利 2、已返利
    private int isRebate;
    
    // 是否已经返利 1、未返利 2、已返利
    private int isParentRebate;
    
    // 汇率
    private double rate;
    
    // 反利率
    private double rebateRate;
    
    // 转换概率
    private double convertRate;
    
    // 贡献月数
    private int parentRebateMonth;
    
    // 贡献比例
    private double parentRebateRate;
    
    /**
     * 获取 orderID
     * 
     * @return 返回 orderID
     */
    public String getOrderID()
    {
        return orderID;
    }
    
    /**
     * 设置 orderID
     * 
     * @param 对orderID进行赋值
     */
    public void setOrderID(String orderID)
    {
        this.orderID = orderID;
    }
    
    /**
     * 获取 shopSite
     * 
     * @return 返回 shopSite
     */
    public String getShopSite()
    {
        return shopSite;
    }
    
    /**
     * 设置 shopSite
     * 
     * @param 对shopSite进行赋值
     */
    public void setShopSite(String shopSite)
    {
        this.shopSite = shopSite;
    }
    
    /**
     * 获取 username
     * 
     * @return 返回 username
     */
    public String getUsername()
    {
        return username;
    }
    
    /**
     * 设置 username
     * 
     * @param 对username进行赋值
     */
    public void setUsername(String username)
    {
        this.username = username;
    }
    
    /**
     * 获取 rebateID
     * 
     * @return 返回 rebateID
     */
    public String getRebateID()
    {
        return rebateID;
    }
    
    /**
     * 设置 rebateID
     * 
     * @param 对rebateID进行赋值
     */
    public void setRebateID(String rebateID)
    {
        this.rebateID = rebateID;
    }
    
    /**
     * 获取 label
     * 
     * @return 返回 label
     */
    public String getLabel()
    {
        return label;
    }
    
    /**
     * 设置 label
     * 
     * @param 对label进行赋值
     */
    public void setLabel(String label)
    {
        this.label = label;
    }
    
    /**
     * 获取 rebate
     * 
     * @return 返回 rebate
     */
    public double getRebate()
    {
        return rebate;
    }
    
    /**
     * 设置 rebate
     * 
     * @param 对rebate进行赋值
     */
    public void setRebate(double rebate)
    {
        this.rebate = rebate;
    }
    
    /**
     * 获取 parentRebate
     * @return 返回 parentRebate
     */
    public double getParentRebate()
    {
        return parentRebate;
    }

    /**
     * 设置 parentRebate
     * @param 对parentRebate进行赋值
     */
    public void setParentRebate(double parentRebate)
    {
        this.parentRebate = parentRebate;
    }

    /**
     * 获取 innerID
     * 
     * @return 返回 innerID
     */
    public String getInnerID()
    {
        return innerID;
    }
    
    /**
     * 设置 innerID
     * 
     * @param 对innerID进行赋值
     */
    public void setInnerID(String innerID)
    {
        this.innerID = innerID;
    }
    
    /**
     * 获取 parentInnerID
     * 
     * @return 返回 parentInnerID
     */
    public String getParentInnerID()
    {
        return parentInnerID;
    }
    
    /**
     * 设置 parentInnerID
     * 
     * @param 对parentInnerID进行赋值
     */
    public void setParentInnerID(String parentInnerID)
    {
        this.parentInnerID = parentInnerID;
    }
    
    /**
     * 获取 orderPrice
     * 
     * @return 返回 orderPrice
     */
    public double getOrderPrice()
    {
        return orderPrice;
    }
    
    /**
     * 设置 orderPrice
     * 
     * @param 对orderPrice进行赋值
     */
    public void setOrderPrice(double orderPrice)
    {
        this.orderPrice = orderPrice;
    }
    
    /**
     * 获取 orderDate
     * 
     * @return 返回 orderDate
     */
    public String getOrderDate()
    {
        return orderDate;
    }
    
    /**
     * 设置 orderDate
     * 
     * @param 对orderDate进行赋值
     */
    public void setOrderDate(String orderDate)
    {
        this.orderDate = orderDate;
    }
    
    /**
     * 获取 orderYear
     * 
     * @return 返回 orderYear
     */
    public String getOrderYear()
    {
        return orderYear;
    }
    
    /**
     * 设置 orderYear
     * 
     * @param 对orderYear进行赋值
     */
    public void setOrderYear(String orderYear)
    {
        this.orderYear = orderYear;
    }
    
    /**
     * 获取 orderMonth
     * 
     * @return 返回 orderMonth
     */
    public String getOrderMonth()
    {
        return orderMonth;
    }
    
    /**
     * 设置 orderMonth
     * 
     * @param 对orderMonth进行赋值
     */
    public void setOrderMonth(String orderMonth)
    {
        this.orderMonth = orderMonth;
    }
    
    /**
     * 获取 startDate
     * 
     * @return 返回 startDate
     */
    public String getStartDate()
    {
        return startDate;
    }
    
    /**
     * 设置 startDate
     * 
     * @param 对startDate进行赋值
     */
    public void setStartDate(String startDate)
    {
        this.startDate = startDate;
    }
    
    /**
     * 获取 endDate
     * 
     * @return 返回 endDate
     */
    public String getEndDate()
    {
        return endDate;
    }
    
    /**
     * 设置 endDate
     * 
     * @param 对endDate进行赋值
     */
    public void setEndDate(String endDate)
    {
        this.endDate = endDate;
    }
    
    /**
     * 获取 isValid
     * 
     * @return 返回 isValid
     */
    public int getIsValid()
    {
        return isValid;
    }
    
    /**
     * 设置 isValid
     * 
     * @param 对isValid进行赋值
     */
    public void setIsValid(int isValid)
    {
        this.isValid = isValid;
    }
    
    /**
     * 获取 isRebate
     * 
     * @return 返回 isRebate
     */
    public int getIsRebate()
    {
        return isRebate;
    }
    
    /**
     * 设置 isRebate
     * 
     * @param 对isRebate进行赋值
     */
    public void setIsRebate(int isRebate)
    {
        this.isRebate = isRebate;
    }
    
    /**
     * 获取 isParentRebate
     * 
     * @return 返回 isParentRebate
     */
    public int getIsParentRebate()
    {
        return isParentRebate;
    }
    
    /**
     * 设置 isParentRebate
     * 
     * @param 对isParentRebate进行赋值
     */
    public void setIsParentRebate(int isParentRebate)
    {
        this.isParentRebate = isParentRebate;
    }
    
    /**
     * 获取 rate
     * 
     * @return 返回 rate
     */
    public double getRate()
    {
        return rate;
    }
    
    /**
     * 设置 rate
     * 
     * @param 对rate进行赋值
     */
    public void setRate(double rate)
    {
        this.rate = rate;
    }
    
    /**
     * 获取 rebateRate
     * 
     * @return 返回 rebateRate
     */
    public double getRebateRate()
    {
        return rebateRate;
    }
    
    /**
     * 设置 rebateRate
     * 
     * @param 对rebateRate进行赋值
     */
    public void setRebateRate(double rebateRate)
    {
        this.rebateRate = rebateRate;
    }
    
    /**
     * 获取 convertRate
     * @return 返回 convertRate
     */
    public double getConvertRate()
    {
        return convertRate;
    }

    /**
     * 设置 convertRate
     * @param 对convertRate进行赋值
     */
    public void setConvertRate(double convertRate)
    {
        this.convertRate = convertRate;
    }

    /**
     * 获取 parentRebateMonth
     * 
     * @return 返回 parentRebateMonth
     */
    public int getParentRebateMonth()
    {
        return parentRebateMonth;
    }
    
    /**
     * 设置 parentRebateMonth
     * 
     * @param 对parentRebateMonth进行赋值
     */
    public void setParentRebateMonth(int parentRebateMonth)
    {
        this.parentRebateMonth = parentRebateMonth;
    }
    
    /**
     * 获取 parentRebateRate
     * 
     * @return 返回 parentRebateRate
     */
    public double getParentRebateRate()
    {
        return parentRebateRate;
    }
    
    /**
     * 设置 parentRebateRate
     * 
     * @param 对parentRebateRate进行赋值
     */
    public void setParentRebateRate(double parentRebateRate)
    {
        this.parentRebateRate = parentRebateRate;
    }
    
    /** 
     * <pre>
     * <一句话功能简述>
     * <功能详细描述>
     * </pre>
     *
     * @author  xuganhua
     * @version  [版本号, 2016年6月3日]
     * @return
     * @see [类、类#方法、类#成员]
     */
    @Override
    public int hashCode()
    {
        final int prime = 31;
        int result = 1;
        long temp;
        temp = Double.doubleToLongBits(convertRate);
        result = prime * result + (int)(temp ^ (temp >>> 32));
        result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
        result = prime * result + ((innerID == null) ? 0 : innerID.hashCode());
        result = prime * result + isParentRebate;
        result = prime * result + isRebate;
        result = prime * result + isValid;
        result = prime * result + ((label == null) ? 0 : label.hashCode());
        result = prime * result + ((orderDate == null) ? 0 : orderDate.hashCode());
        result = prime * result + ((orderID == null) ? 0 : orderID.hashCode());
        result = prime * result + ((orderMonth == null) ? 0 : orderMonth.hashCode());
        temp = Double.doubleToLongBits(orderPrice);
        result = prime * result + (int)(temp ^ (temp >>> 32));
        result = prime * result + ((orderYear == null) ? 0 : orderYear.hashCode());
        result = prime * result + ((parentInnerID == null) ? 0 : parentInnerID.hashCode());
        temp = Double.doubleToLongBits(parentRebate);
        result = prime * result + (int)(temp ^ (temp >>> 32));
        result = prime * result + parentRebateMonth;
        temp = Double.doubleToLongBits(parentRebateRate);
        result = prime * result + (int)(temp ^ (temp >>> 32));
        temp = Double.doubleToLongBits(rate);
        result = prime * result + (int)(temp ^ (temp >>> 32));
        temp = Double.doubleToLongBits(rebate);
        result = prime * result + (int)(temp ^ (temp >>> 32));
        result = prime * result + ((rebateID == null) ? 0 : rebateID.hashCode());
        temp = Double.doubleToLongBits(rebateRate);
        result = prime * result + (int)(temp ^ (temp >>> 32));
        result = prime * result + ((shopSite == null) ? 0 : shopSite.hashCode());
        result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());
        result = prime * result + ((username == null) ? 0 : username.hashCode());
        return result;
    }
    
    /** 
     * <pre>
     * <一句话功能简述>
     * <功能详细描述>
     * </pre>
     *
     * @author  xuganhua
     * @version  [版本号, 2016年6月3日]
     * @param obj
     * @return
     * @see [类、类#方法、类#成员]
     */
    @Override
    public boolean equals(Object obj)
    {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        OrderBO other = (OrderBO)obj;
        if (Double.doubleToLongBits(convertRate) != Double.doubleToLongBits(other.convertRate))
            return false;
        if (endDate == null)
        {
            if (other.endDate != null)
                return false;
        }
        else if (!endDate.equals(other.endDate))
            return false;
        if (innerID == null)
        {
            if (other.innerID != null)
                return false;
        }
        else if (!innerID.equals(other.innerID))
            return false;
        if (isParentRebate != other.isParentRebate)
            return false;
        if (isRebate != other.isRebate)
            return false;
        if (isValid != other.isValid)
            return false;
        if (label == null)
        {
            if (other.label != null)
                return false;
        }
        else if (!label.equals(other.label))
            return false;
        if (orderDate == null)
        {
            if (other.orderDate != null)
                return false;
        }
        else if (!orderDate.equals(other.orderDate))
            return false;
        if (orderID == null)
        {
            if (other.orderID != null)
                return false;
        }
        else if (!orderID.equals(other.orderID))
            return false;
        if (orderMonth == null)
        {
            if (other.orderMonth != null)
                return false;
        }
        else if (!orderMonth.equals(other.orderMonth))
            return false;
        if (Double.doubleToLongBits(orderPrice) != Double.doubleToLongBits(other.orderPrice))
            return false;
        if (orderYear == null)
        {
            if (other.orderYear != null)
                return false;
        }
        else if (!orderYear.equals(other.orderYear))
            return false;
        if (parentInnerID == null)
        {
            if (other.parentInnerID != null)
                return false;
        }
        else if (!parentInnerID.equals(other.parentInnerID))
            return false;
        if (Double.doubleToLongBits(parentRebate) != Double.doubleToLongBits(other.parentRebate))
            return false;
        if (parentRebateMonth != other.parentRebateMonth)
            return false;
        if (Double.doubleToLongBits(parentRebateRate) != Double.doubleToLongBits(other.parentRebateRate))
            return false;
        if (Double.doubleToLongBits(rate) != Double.doubleToLongBits(other.rate))
            return false;
        if (Double.doubleToLongBits(rebate) != Double.doubleToLongBits(other.rebate))
            return false;
        if (rebateID == null)
        {
            if (other.rebateID != null)
                return false;
        }
        else if (!rebateID.equals(other.rebateID))
            return false;
        if (Double.doubleToLongBits(rebateRate) != Double.doubleToLongBits(other.rebateRate))
            return false;
        if (shopSite == null)
        {
            if (other.shopSite != null)
                return false;
        }
        else if (!shopSite.equals(other.shopSite))
            return false;
        if (startDate == null)
        {
            if (other.startDate != null)
                return false;
        }
        else if (!startDate.equals(other.startDate))
            return false;
        if (username == null)
        {
            if (other.username != null)
                return false;
        }
        else if (!username.equals(other.username))
            return false;
        return true;
    }
    
    /** 
     * <pre>
     * <一句话功能简述>
     * <功能详细描述>
     * </pre>
     *
     * @author  xuganhua
     * @version  [版本号, 2016年6月3日]
     * @return
     * @see [类、类#方法、类#成员]
     */
    @Override
    public String toString()
    {
        return "OrderBO [orderID=" + orderID + ", shopSite=" + shopSite + ", username=" + username + ", label=" + label
            + ", rebateID=" + rebateID + ", rebate=" + rebate + ", parentRebate=" + parentRebate + ", innerID="
            + innerID + ", parentInnerID=" + parentInnerID + ", orderPrice=" + orderPrice + ", orderDate=" + orderDate
            + ", orderYear=" + orderYear + ", orderMonth=" + orderMonth + ", startDate=" + startDate + ", endDate="
            + endDate + ", isValid=" + isValid + ", isRebate=" + isRebate + ", isParentRebate=" + isParentRebate
            + ", rate=" + rate + ", rebateRate=" + rebateRate + ", convertRate=" + convertRate + ", parentRebateMonth="
            + parentRebateMonth + ", parentRebateRate=" + parentRebateRate + "]";
    }
    
}
